<template>
  <view class="star">
    <uni-rate size="20" :readonly="true" allow-half :value="score" />
    <text class="score">{{ score }}</text>
  </view>
</template>

<script>
export default {
  data() {
    return {
      score: "5",
    };
  },
  mounted() {
    this.score = parseFloat(Math.random() + 3.9).toFixed(1);
  },
};
</script>

<style scoped>
.star {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.star-icon {
  width: 20upx;
  height: 20upx;
  margin-right: 10upx;
}

.score {
  color: #8389a0;
  font-size: 26upx;
}
</style>